package com.bestcem.xm.ticket.dao;

import com.bestcem.xm.ticket.entity.mongo.TicketFlow;

import java.util.List;

/**
 * @author gy.liu
 * @version 1.0
 * @className
 * @description
 * @date 2021/8/18 13:58
 **/
public interface TicketFlowDao {

    /**
     * 根据id查询工单流程
     *
     * @param id
     * @return TicketFlow
     * @version v1.0
     * @author gy.liu
     * @date 2021/8/18
     */
    TicketFlow findById(String id);

    /**
     * 根据配置id查询工单流程
     *
     * @param ticketConfigId
     * @return TicketFlow
     * @version v1.0
     * @author gy.liu
     * @date 2021/8/18
     */
    List<TicketFlow> findByConfigId(String ticketConfigId);

    /**
     * 保存工单流程信息
     *
     * @param ticketFlow
     * @return TicketFlow
     * @version v1.0
     * @author gy.liu
     * @date 2021/8/18
     */
    TicketFlow saveTicketFlow(TicketFlow ticketFlow);

    /**
     * 根据工单配置id和状态查询工单流程
     *
     * @param ticketConfigId
     * @param status
     * @return List<TicketFlow>
     * @version v1.0
     * @author gy.liu
     * @date 2021/8/19
     */
    List<TicketFlow> findTicketFlowByStatus(String ticketConfigId, int status);

    /**
     * 根据工单配置id和工单流程id查询工单流程
     *
     * @param ticketConfigId
     * @param ticketFlowIds
     * @return List<TicketFlow>
     * @version v1.0
     * @author gy.liu
     * @date 2021/8/19
     */
    List<TicketFlow> findTicketFlowById(String ticketConfigId, List<String> ticketFlowIds);

    /**
     * update工单配置
     *
     * @param id
     * @param ticketFlow
     */
    TicketFlow updateTicketFlow(String id, TicketFlow ticketFlow);

}
